package com.zzzyh.spring.service;

import com.zzzyh.spring.mapper.MessagewallMapper;
import com.zzzyh.spring.pojo.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessagewallService {
    @Autowired
    public MessagewallMapper messagewallMapper;

    public List<Message> getMessages() {
        return messagewallMapper.getMessages();
    }

    public boolean addMessage(Message message) {
        return messagewallMapper.addMessage(message) > 0;
    }
}
